package com.ruoyi.flow.entity.event;

import com.ruoyi.flow.entity.machine.Event;
import com.ruoyi.flow.entity.machine.Node;
import lombok.Data;

import java.util.HashSet;
import java.util.Set;

@Data
public class NodeEvent {

    public NodeEvent(Node node) {
        this.id = node.getId();
        this.name = node.getName();
        this.type = node.getType();
        this.state = node.getState();

        this.events = new HashSet<>();
    }

    private String id;
    private String name;
    private String type;
    private String state;
    private Set<Event> events;
}
